home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / python2.4 / test / test_call.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2005-10-18  |  5KB  |  165 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.4)
  3.  
  4. import unittest
  5. from test import test_support
  6.  
  7. class CFunctionCalls(unittest.TestCase):
  8.     
  9.     def test_varargs0(self):
  10.         self.assertRaises(TypeError, { }.has_key)
  11.  
  12.     
  13.     def test_varargs1(self):
  14.         { }.has_key(0)
  15.  
  16.     
  17.     def test_varargs2(self):
  18.         self.assertRaises(TypeError, { }.has_key, 0, 1)
  19.  
  20.     
  21.     def test_varargs0_ext(self):
  22.         
  23.         try:
  24.             { }.has_key(*())
  25.         except TypeError:
  26.             pass
  27.  
  28.  
  29.     
  30.     def test_varargs1_ext(self):
  31.         { }.has_key(*(0,))
  32.  
  33.     
  34.     def test_varargs2_ext(self):
  35.         
  36.         try:
  37.             { }.has_key(*(1, 2))
  38.         except TypeError:
  39.             pass
  40.  
  41.         raise RuntimeError
  42.  
  43.     
  44.     def test_varargs0_kw(self):
  45.         self.assertRaises(TypeError, { }.has_key, x = 2)
  46.  
  47.     
  48.     def test_varargs1_kw(self):
  49.         self.assertRaises(TypeError, { }.has_key, x = 2)
  50.  
  51.     
  52.     def test_varargs2_kw(self):
  53.         self.assertRaises(TypeError, { }.has_key, x = 2, y = 2)
  54.  
  55.     
  56.     def test_oldargs0_0(self):
  57.         { }.keys()
  58.  
  59.     
  60.     def test_oldargs0_1(self):
  61.         self.assertRaises(TypeError, { }.keys, 0)
  62.  
  63.     
  64.     def test_oldargs0_2(self):
  65.         self.assertRaises(TypeError, { }.keys, 0, 1)
  66.  
  67.     
  68.     def test_oldargs0_0_ext(self):
  69.         { }.keys(*())
  70.  
  71.     
  72.     def test_oldargs0_1_ext(self):
  73.         
  74.         try:
  75.             { }.keys(*(0,))
  76.         except TypeError:
  77.             pass
  78.  
  79.         raise RuntimeError
  80.  
  81.     
  82.     def test_oldargs0_2_ext(self):
  83.         
  84.         try:
  85.             { }.keys(*(1, 2))
  86.         except TypeError:
  87.             pass
  88.  
  89.         raise RuntimeError
  90.  
  91.     
  92.     def test_oldargs0_0_kw(self):
  93.         
  94.         try:
  95.             { }.keys(x = 2)
  96.         except TypeError:
  97.             pass
  98.  
  99.         raise RuntimeError
  100.  
  101.     
  102.     def test_oldargs0_1_kw(self):
  103.         self.assertRaises(TypeError, { }.keys, x = 2)
  104.  
  105.     
  106.     def test_oldargs0_2_kw(self):
  107.         self.assertRaises(TypeError, { }.keys, x = 2, y = 2)
  108.  
  109.     
  110.     def test_oldargs1_0(self):
  111.         self.assertRaises(TypeError, [].count)
  112.  
  113.     
  114.     def test_oldargs1_1(self):
  115.         [].count(1)
  116.  
  117.     
  118.     def test_oldargs1_2(self):
  119.         self.assertRaises(TypeError, [].count, 1, 2)
  120.  
  121.     
  122.     def test_oldargs1_0_ext(self):
  123.         
  124.         try:
  125.             [].count(*())
  126.         except TypeError:
  127.             pass
  128.  
  129.         raise RuntimeError
  130.  
  131.     
  132.     def test_oldargs1_1_ext(self):
  133.         [].count(*(1,))
  134.  
  135.     
  136.     def test_oldargs1_2_ext(self):
  137.         
  138.         try:
  139.             [].count(*(1, 2))
  140.         except TypeError:
  141.             pass
  142.  
  143.         raise RuntimeError
  144.  
  145.     
  146.     def test_oldargs1_0_kw(self):
  147.         self.assertRaises(TypeError, [].count, x = 2)
  148.  
  149.     
  150.     def test_oldargs1_1_kw(self):
  151.         self.assertRaises(TypeError, [].count, { }, x = 2)
  152.  
  153.     
  154.     def test_oldargs1_2_kw(self):
  155.         self.assertRaises(TypeError, [].count, x = 2, y = 2)
  156.  
  157.  
  158.  
  159. def test_main():
  160.     test_support.run_unittest(CFunctionCalls)
  161.  
  162. if __name__ == '__main__':
  163.     test_main()
  164.  
  165.